package com.whw.fy.service.impl;

import com.whw.fy.entity.Message;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.whw.fy.mapper.TechnicalTypeMapper;
import com.whw.fy.entity.TechnicalType;
import com.whw.fy.service.TechnicalTypeService;

@Service
public class TechnicalTypeServiceImpl implements TechnicalTypeService {

    @Resource
    private TechnicalTypeMapper technicalTypeMapper;

    @Override
    public Message deleteByPrimaryKey(Integer technicalTypeId) {
        return technicalTypeMapper.deleteByPrimaryKey(technicalTypeId)>0?Message.success(null):Message.fail(null);
    }



    @Override
    public Message insertSelective(TechnicalType record) {
        return technicalTypeMapper.insertSelective(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message selectByPrimaryKey(Integer technicalTypeId) {
        return Message.success(null).add(technicalTypeMapper.selectByPrimaryKey(technicalTypeId));
    }

    @Override
    public Message updateByPrimaryKeySelective(TechnicalType record) {
        return technicalTypeMapper.updateByPrimaryKeySelective(record)>0?Message.success(null):Message.fail(null);
    }



    @Override
    public Message selectAll() {
        return Message.success(null).add(technicalTypeMapper.selectAll());
    }

    @Override
    public Message batchInsert(List<TechnicalType> list) {
        return technicalTypeMapper.batchInsert(list)>0?Message.success(null):Message.fail(null);
    }

}

